<template>
  <div>
    <div class="add">
      <div class="add-main">
        <div class="add-btn">
          <button @click="back()">返回</button>
        </div>
        <div class="add-content">
          <div class="add-name">
            <div class="add-user">
              <span>轮播名称</span>
            </div>
            <div class="add-input">
             <input type="text" placeholder="请输入轮播名称" value="轮播1">
            </div>
          </div>

          <div class="add-name">
            <div class="add-user">
              <span>所在分区</span>
            </div>
            <div class="add-select">
              <el-select v-model="value" clearable placeholder="请选择分区" :value="Home">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </div>

          <!-- 轮播图片 -->

          <div class="add-name">
            <div class="add-user">
              <span>轮播图片</span>
            </div>
            <div class="add-pic">
             <img src="../assets/lunbopicone.svg" alt="">
            </div>
          </div>

          <!-- 轮播链接 -->

           <div class="add-name">
            <div class="add-user">
              <span>轮播链接</span>
            </div>
            <div class="add-select">
               <el-input placeholder="请输入正确链接地址,非必填" v-model="input" clearable>
              </el-input>
            </div>
          </div>

          <!-- 确定按钮 -->
           <div class="add-name">
           
            <div class="add-select">
              <el-button type="primary" class="sure">确定</el-button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      options: [
        {
          value: "选项1",
          label: "请选择分区",
        },
        {
          value: "选项2",
          label: "首页",
        },
        {
          value: "选项3",
          label: "成片区",
        },
        {
          value: "选项4",
          label: "...",
        },
        // {
        //   value: "选项5",
        //   label: "北京烤鸭",
        // },
      ],

      Home:"首页",
      value: "",
      values:"",
      input: "",
      inputs:"",
      imageUrl: '',
    };
  },

  methods: {
    back() {
      this.$router.push({
        path: "/Rotationsettings",
      });
    },

    

     
    
  },
  mounted() {
    document
      .querySelector("body")
      .setAttribute("style", "background-color:#f2f2f2;");
  },

  beforeDestroy() {
    document.querySelector("body").removeAttribute("style");
  },
};
</script>

<style lang="scss">
.add {
  width: 100%;
  margin-top: 20px;
}

.add-main {
  width: 1200px;
  height: 697px;
  margin: 0 auto;
  background-color: white;
  min-width: 1200px;

  .add-btn {
    width: 77px;
    height: 40px;
    margin-top: 27px;
    margin-right: 32px;
    float: right;

    button {
      width: 77px;
      height: 40px;
      background-color: white;
      outline: none;
      cursor: pointer;
      border-radius: 5px;
      border: 1px solid gray;
    }
  }

  .add-content {
    padding-top: 70px;
  }
  .add-name {
    display: flex;
    padding-top: 25px;
    padding-left: 70px;

    .add-user {
      margin-right: 17px;
      margin-top: 7px;

      span {
        width: 100px;
        display: inline-block;
        padding-top: 1px;
        font-size: 14px;
      }
    }

    .add-input {
      width: 414px;

      input {
        width: 414px;
        height: 30px;
        padding-top: 3px;
        padding-bottom: 3px;
        padding-left: 5px;
        outline: none;
        border: 1px solid rgba(215, 215, 215, 1);
        border-radius: 3px;
      }
    }

    .add-select {
      width: 414px;

      input {
        width: 414px;

        padding-left: 5px;
        outline: none;
        border: 1px solid rgba(215, 215, 215, 1);
        border-radius: 3px;
      }
    }
  }

   .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
}

.sure {
    width: 103px;
    margin-top: 60px;
}
</style>